Don't assume $wgUser is always the editor, it's poor practice and confusing...
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 17 May 2008 22:37:06 +0000 (22:37 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 17 May 2008 22:37:06 +0000 (22:37 +0000)
includes/RecentChange.php

index c1f2722..2331288 100644 (file)
@@ -224,10 +224,12 @@ class RecentChange
                # E-mail notifications
                global $wgUseEnotif, $wgUser;
                if( $wgUseEnotif ) {
+                       $editor = ($wgUser->getID() == $this->mAttribs['rc_user']) ? 
+                               $wgUser : User::newFromID( $this->mAttribs['rc_user'] );
                        # FIXME: this would be better as an extension hook
                        $enotif = new EmailNotification();
                        $title = Title::makeTitle( $this->mAttribs['rc_namespace'], $this->mAttribs['rc_title'] );
-                       $enotif->notifyOnPageChange( $wgUser, $title,
+                       $enotif->notifyOnPageChange( $editor, $title,
                                $this->mAttribs['rc_timestamp'],
                                $this->mAttribs['rc_comment'],
                                $this->mAttribs['rc_minor'],